<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>学生考试管理系统 - 登录</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <style>
        body {
            background-color: #f5f5f5;
        }
        .login-container {
            max-width: 400px;
            margin: 100px auto;
            padding: 20px;
            background-color: #fff;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        .login-logo {
            text-align: center;
            margin-bottom: 30px;
        }
        .login-logo i {
            font-size: 5rem;
            color: #0d6efd;
        }
    </style>
</head>
<body>
<div class="login-container">
    <div class="login-logo">
        <i class="fa fa-graduation-cap"></i>
        <h3>学生考试管理系统</h3>
    </div>

    <!-- 错误消息提示 -->
    <c:if test="${not empty error}">
        <div class="alert alert-danger" role="alert">
            ${error}
        </div>
    </c:if>

    <form action="login" method="post">
        <div class="mb-3">
            <label for="studentId" class="form-label">学号</label>
            <div class="input-group">
                <span class="input-group-text"><i class="fa fa-user"></i></span>
                <input type="text" class="form-control" id="studentId" name="studentId" placeholder="请输入学号" required>
            </div>
        </div>

        <div class="mb-3">
            <label for="password" class="form-label">密码</label>
            <div class="input-group">
                <span class="input-group-text"><i class="fa fa-lock"></i></span>
                <input type="password" class="form-control" id="password" name="password" placeholder="请输入密码" required>
            </div>
        </div>

        <div class="mb-3 form-check">
            <input type="checkbox" class="form-check-input" id="remember">
            <label class="form-check-label" for="remember">记住我</label>
        </div>

        <button type="submit" class="btn btn-primary w-100">登录</button>
    </form>

    <div class="mt-3 text-center">
        <a href="#" class="text-decoration-none">忘记密码?</a>
    </div>

    <div class="mt-4 text-center text-muted">
        <p>© 2025 学生考试管理系统</p>
    </div>
</div>
</body>
</html> 